package sctu.edu.java.year2016.team01.zhuming.day20160527.chapter7_2;

import java.util.Scanner;

/**
 * Created by Administrator on 2016/5/28.
 */
public class Cet {
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        System.out.println("请输入矩形的长：");

        double chang= scan.nextDouble();
        System.out.println("请输入矩形的宽：");

        double kuan=scan.nextDouble();

        if(kuan>chang) {

           double num=kuan;
            kuan=chang;
            chang=num;
        }
        System.out.println("矩形的长："+chang);
        System.out.println("矩形的宽："+kuan);
        JuXin juxin=new JuXin(chang,kuan);

        System.out.println("矩形的面积是："+JuXin.juxingmianji());

    }
}
